#!/bin/bash
# At.sh
# **********************************************************************
# This program is part of the source code released for ADI
#  (c) Author: Wyther Yang
#  GitHub repository:
#  https://github.com/wythers/ioCoro
# **********************************************************************
# Brief Description:
#
name=$(basename "$0")

# GuangZhou
./vertex localhost:1024 localhost:1025 localhost:1027 localhost:1029 &

# ZhenZhou
./vertex localhost:1025 localhost:1024 localhost:1026 localhost:1028 &

# BeiJing
./vertex localhost:1026 localhost:1025 localhost:1028 &

# ShenZhen
./vertex localhost:1027 localhost:1024 localhost:1029 &

# XinJiang
./vertex localhost:1028 localhost:1025 localhost:1026 &

# WuHan
./vertex localhost:1029 localhost:1027 localhost:1024 &

sleep 1

echo "-------------------------------"

./tree $1

sleep 1
echo "-------------------------------"

kill -9 %1
kill -9 %2
kill -9 %3
kill -9 %4
kill -9 %5
kill -9 %6

